package com.design.patterns.behavioralModel.factoryMethod.factory.Impl;

import com.design.patterns.behavioralModel.factoryMethod.factory.NumberFactory;

import java.math.BigDecimal;

/**
 * 工厂实现类:真正的工厂NumberFactoryImpl和真正的产品BigDecimal
 */
public class NumberFactoryImpl implements NumberFactory {
    @Override
    public int parse(String num) {
        return new BigDecimal(num).intValue();
    }
}
